package cn.felord.common.service;

import cn.felord.common.bean.Menu;
import cn.felord.common.entity.SysResources;
import cn.felord.common.entity.dto.ResourceRole;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 资源表 服务类
 * </p>
 *
 * @author dax
 * @since 2018 -09-13
 */
public interface ISysResourcesService extends IService<SysResources> {
    /**
     * Init url role storage list.
     *
     * @return the list
     */
    List<ResourceRole> initUrlRoleStorage();

    /**
     * 获取用户菜单.
     *
     * @param userId the user id
     * @return the linked hash set
     */
    LinkedHashSet<Menu> findMenuByUserId(String userId);

    /**
     * Find menu by parent id list.
     *
     * @param parentId the parent id
     * @return the list
     */
    List<Map<String,Object>> findMenuByParentId(@Param("parentId") String parentId);

}
